package com.zmn.oms.common.constant;

import java.util.Objects;

/**
 * @author sunlife
 * @date:2021/12/13 9:16 下午
 * description:
 */
public class OrderQuotation3Constant {

    // 检修方式
    public static final int CHECK_TYPE_ARTIFICIAL = 1;
    public static final int CHECK_TYPE_AI = 2;

    public static String getCheckTypeName(Integer checkType) {
        if (Objects.isNull(checkType)) {
            checkType = CHECK_TYPE_ARTIFICIAL;
        }
        switch (checkType) {
            case CHECK_TYPE_ARTIFICIAL:
                return "人工";
            case CHECK_TYPE_AI:
                return "AI检修";
            default:
                return "未知检修方式";
        }
    }

    public static final int FAULT_LEVEL_1 = 1;
    public static final int FAULT_LEVEL_2 = 2;
    public static final int FAULT_LEVEL_3 = 3;
    public static final int FAULT_LEVEL_4 = 4;

    public static String getFaultLevel(Integer faultLevel) {
        if (Objects.isNull(faultLevel)) {
            faultLevel = FAULT_LEVEL_1;
        }
        switch (faultLevel) {
            case FAULT_LEVEL_1:
                return "简单故障";
            case FAULT_LEVEL_2:
                return "一般故障";
            case FAULT_LEVEL_3:
                return "中等故障";
            case FAULT_LEVEL_4:
                return "复杂故障";
            default:
                return "未知难度";
        }
    }

    public static final int FAULT_DIFFICULTY_1 = 1;
    public static final int FAULT_DIFFICULTY_2 = 2;
    public static final int FAULT_DIFFICULTY_3 = 3;
    public static final int FAULT_DIFFICULTY_4 = 4;

    public static String getFaultDifficulty(Integer faultDifficulty) {
        if (Objects.isNull(faultDifficulty)) {
            faultDifficulty = FAULT_DIFFICULTY_1;
        }
        switch (faultDifficulty) {
            case FAULT_DIFFICULTY_1:
                return "简单维修";
            case FAULT_DIFFICULTY_2:
                return "普通维修";
            case FAULT_DIFFICULTY_3:
                return "中等维修";
            case FAULT_DIFFICULTY_4:
                return "复杂维修";
            default:
                return "未知维修难度";
        }
    }

}
